/**
 * Aibton.com Inc.
 * Copyright (c) 2016-2017 All Rights Reserved.
 */
package com.aibton.example.api;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aibton.example.data.SystemInfoResponse;
import com.aibton.framework.api.AbstractBaseApi;
import com.aibton.framework.api.annotation.Api;
import com.aibton.framework.data.BaseRequest;
import com.aibton.framework.data.BaseResponse;
import com.aibton.framework.util.ResponseUtils;
import com.aibton.framework.util.RestTemplateUtils;

/**
 * @author huzhihui
 * @version $: v 0.1 2017 2017/7/28 15:03 huzhihui Exp $$
 */
@Service
@Transactional
@Api(value = "systemInfo")
public class SystemInfoApi extends AbstractBaseApi<BaseRequest, SystemInfoResponse> {

    @Override
    public BaseResponse excute(BaseRequest request, SystemInfoResponse response) {
        String o = RestTemplateUtils.getForObject(
            "http://www.likuix.com/sysIndex/selectImagesByType?jsonStr=%7B%22currentPage%22:1,%22pageSize%22:10,%22sysIndexType%22:1%7D",
            String.class);
        System.out.println(o);
        return ResponseUtils.getData(true, "systemInfo请求成功啦");
    }
}